<template>
  <div class="app-container">
    <div class="custom_card_0" v-show="showSearch">
      <el-form
        :model="queryParams"
        ref="queryForm"
        :inline="true"
        label-width="68px"
      >
        <el-form-item label="订单编号" prop="customerName">
          <el-input
            v-model="queryParams.orderNo"
            placeholder="请输入订单编号"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>

        <el-form-item label="客户姓名" prop="customerName">
          <el-input
            v-model="queryParams.customerName"
            placeholder="请输入客户姓名"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>

        <el-form-item label="订单状态" prop="customerName">
          <el-select
            v-model="queryParams.orderStatus"
            placeholder="请选择"
            clearable
            @change="handleQuery"
          >
            <el-option label="已排车" value="已排车"></el-option>
            <el-option label="已取车" value="已取车"></el-option>
            <el-option label="已还车" value="已还车"></el-option>
            <el-option label="已取消" value="已取消"></el-option>
            <el-option label="已退订" value="已退订"></el-option>
            <el-option label="已完成" value="已完成"></el-option>
          </el-select>
        </el-form-item>

        <el-form-item>
          <el-button
            type="primary"
            icon="el-icon-search"
            size="mini"
            @click="handleQuery"
            >搜索</el-button
          >
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
            >重置</el-button
          >
        </el-form-item>
      </el-form>
    </div>
    <div class="custom_card">
      <el-row :gutter="10" class="mb10">
        <el-col :span="1.5">
          <el-button
            type="info"
            plain
            icon="el-icon-upload2"
            size="mini"
            @click="handleImport"
            v-hasPermi="['xiecheng:xcOrder:import']"
            >导入</el-button
          >
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            :loading="exportLoading"
            @click="handleExport"
            v-hasPermi="['xiecheng:xcOrder:export']"
            >导出</el-button
          >
        </el-col>
        <right-toolbar
          :showSearch.sync="showSearch"
          @queryTable="getList"
        ></right-toolbar>
      </el-row>

      <el-table
        v-loading="loading"
        :data="xcOrderList"
        @selection-change="handleSelectionChange"
        border
      >
        <el-table-column
          label="订单编号"
          align="center"
          prop="orderNo"
          min-width="160"
          show-overflow-tooltip
        />
        <el-table-column
          label="客户姓名"
          align="center"
          prop="customerName"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="租期"
          align="center"
          prop="leaseTerm"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="实际租期"
          align="center"
          prop="actualLeaseTerm"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="订单状态"
          align="center"
          prop="orderStatus"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="取车地址"
          align="center"
          prop="pickUpAddress"
          min-width="140"
          show-overflow-tooltip
        />
        <el-table-column
          label="还车地址"
          align="center"
          prop="returnAddress"
          min-width="140"
          show-overflow-tooltip
        />
        <el-table-column
          label="车牌"
          align="center"
          prop="licensePlate"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="携程订单号"
          align="center"
          prop="ctripOrderNo"
          min-width="160"
          show-overflow-tooltip
        />
        <el-table-column
          label="付款方式"
          align="center"
          prop="paymentMethod"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="下单金额"
          align="center"
          prop="orderAmount"
          min-width="120"
          show-overflow-tooltip
        />
        <el-table-column
          label="操作"
          align="center"
          class-name="small-padding fixed-width"
          fixed="left"
          width="140"
        >
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['xiecheng:xcOrder:edit']"
              >详情</el-button
            >
          </template>
        </el-table-column>
      </el-table>

      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>
    <!-- 添加或修改携程订单对话框 -->
    <el-dialog
      title="订单详情"
      :visible.sync="open"
      width="1100px"
      append-to-body
    >
      <div class="app-container">
        <el-form label-width="125px" label-position="right">
          <MmvTitle title="订单信息"></MmvTitle>
          <el-descriptions
            class="margin-top margin-bottom"
            :column="3"
            :size="size"
            border
          >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 订单编号 </template
              >{{ form.orderNo }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 携程订单号 </template
              >{{ form.ctripOrderNo }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 订单状态 </template
              >{{ form.orderStatus }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 订单类型 </template
              >{{ form.orderType }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 客户姓名 </template
              >{{ form.customerName }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 身份证件类型 </template
              >{{ form.typeOfIdCard }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 下单时间 </template
              >{{ form.orderTime }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 租期 </template
              >{{ form.leaseTerm }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 实际租期 </template
              >{{ form.actualLeaseTerm }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 取车地址 </template
              >{{ form.pickUpAddress }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 还车地址 </template
              >{{ form.returnAddress }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 门店名称 </template
              >{{ form.storeName }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 车牌 </template
              >{{ form.licensePlate }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 车型 </template
              >{{ form.model }}</el-descriptions-item
            >
          </el-descriptions>
          <MmvTitle title="费用信息"></MmvTitle>
          <el-descriptions
            class="margin-top margin-bottom"
            :column="3"
            :size="size"
            border
          >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 付款方式 </template
              >{{ form.paymentMethod }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 下单金额 </template
              >{{ form.orderAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 携程实收金额 </template
              >{{ form.ctripPaidInAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 活动优惠金额 </template
              >{{ form.discountAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 租车预授权 </template
              >{{ form.authorizationIs }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 需租车预授权 </template
              >{{ form.authorizationRequired }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 违章预授权 </template
              >{{ form.illegalAuthorization }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 需违章预授权 </template
              >{{ form.illegaRequired }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 提前还车金额 </template
              >{{ form.earlyReturnAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 超小时费 </template
              >{{ form.extraHourlyFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 送车上门服务费 </template
              >{{ form.serviceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 上门取车服务费 </template
              >{{ form.pickUpServiceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 代驾费用 </template
              >{{ form.drivingFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 超公里费 </template
              >{{ form.extraKilometerFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 燃油费 </template
              >{{ form.fuelCost }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 清洗费 </template
              >{{ form.cleaningFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 误工费 </template
              >{{ form.lossOfWorking }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 维修费 </template
              >{{ form.maintenanceCost }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 加油服务费 </template
              >{{ form.refuelingServiceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 夜间服务费 </template
              >{{ form.nightServiceCharge }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 其他费用 </template
              >{{ form.otherExpenses }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 基础服务费 </template
              >{{ form.basicServiceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 租车费 </template
              >{{ form.carRentalFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 服务费 </template
              >{{ form.serviceCharge }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 异门店还车费 </template
              >{{ form.differentStore }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 续租费 </template
              >{{ form.renewalFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 儿童座椅 </template
              >{{ form.childSeat }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> GPS服务费 </template
              >{{ form.gpsServiceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 优享服务费 </template
              >{{ form.preferentialServiceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 无忧尊享服务费 </template
              >{{ form.worryFreeServiceFee }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 违约金 </template
              >{{ form.liquidatedDamages }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 第三方实收费用 </template
              >{{ form.thirdPartyPaid }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 补款金额 </template
              >{{ form.supplementary }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 补款退款金额 </template
              >{{ form.refundAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 车损 </template
              >{{ form.vehicleDamage }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 违章扣款 </template
              >{{ form.illegalDeduction }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 订单应收金额 </template
              >{{ form.receivableAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 应收实收差异 </template
              >{{ form.receivableActual }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 订单实收金额 </template
              >{{ form.orderPaidInAmount }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 最终总订单金额 </template
              >{{ form.finalAmount }}</el-descriptions-item
            >
          </el-descriptions>
          <MmvTitle title="交车信息"></MmvTitle>
          <el-descriptions
            class="margin-top margin-bottom"
            :column="2"
            :size="size"
            border
          >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 取车服务类型 </template
              >{{ form.typeService }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 送车司机 </template
              >{{ form.deliveryDriver }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 取车时间 </template
              >{{ form.pickUpTime }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 实际取车时间 </template
              >{{ form.actualPickUpTime }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 取车公里数 </template
              >{{ form.pickUpKilometers }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 取车油量 </template
              >{{ form.vehicleOilVolume }}</el-descriptions-item
            >
          </el-descriptions>
          <MmvTitle title="还车车信息"></MmvTitle>
          <el-descriptions
            class="margin-top margin-bottom"
            :column="2"
            :size="size"
            border
          >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 还车服务类型 </template
              >{{ form.returnServiceType }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 收车司机 </template
              >{{ form.receivingDriver }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 还车时间 </template
              >{{ form.returnTime }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 实际还车时间 </template
              >{{ form.actualReturnTime }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 还车公里数 </template
              >{{ form.returnKilometers }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 还车油量 </template
              >{{ form.returnFuelVolume }}</el-descriptions-item
            >
          </el-descriptions>
          <MmvTitle title="其他信息"></MmvTitle>
          <el-descriptions
            class="margin-top margin-bottom"
            :column="2"
            :size="size"
            border
          >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 订单渠道 </template
              >{{ form.orderChannel }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 是否优选 </template
              >{{ form.preferredOrNot }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 车辆来源 </template
              >{{ form.sourceIs }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 车辆来源供应商 </template
              >{{ form.sourceSupplier }}</el-descriptions-item
            >
            <el-descriptions-item label-class-name="my-descriptions-label"
              ><template slot="label"> 租赁类型 </template
              >{{ form.leaseType }}</el-descriptions-item
            >
          </el-descriptions>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">关 闭</el-button>
      </div>
    </el-dialog>
    <!-- 导入对话框 -->
    <el-dialog
      :title="upload.title"
      :visible.sync="upload.open"
      width="400px"
      append-to-body
    >
      <el-upload
        ref="upload"
        :limit="1"
        accept=".xlsx, .xls"
        :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport"
        :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress"
        :on-success="handleFileSuccess"
        :auto-upload="false"
        drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <span>仅允许导入xls、xlsx格式文件。</span>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listXcOrder,
  getXcOrder,
  delXcOrder,
  addXcOrder,
  updateXcOrder,
  exportXcOrder,
} from '@/api/xiecheng/xcOrder'
import { getToken } from '@/utils/auth'

import MmvTitle from '@/components/MmvUI/MmvTitle.vue'
export default {
  name: 'XcOrder',
  components: {
    MmvTitle,
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 携程订单表格数据
      xcOrderList: [],
      // 弹出层标题
      title: '',
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        orderNo: null,
        orderStatus: null,
        pageNum: 1,
        pageSize: 10,
        customerName: null,
      },
      // 用户导入参数
      upload: {
        // 是否显示弹出层
        open: false,
        // 弹出层标题
        title: '',
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: {
          Authorization: 'Bearer ' + getToken(),
        },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + '/xiecheng/xcOrder/import',
        // url: process.env.VUE_APP_BASE_API + "/maintenance/repair/import"
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    }
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询携程订单列表 */
    getList() {
      this.loading = true
      listXcOrder(this.queryParams).then((response) => {
        this.xcOrderList = response.rows
        this.total = response.total
        this.loading = false
      })
    },
    // 取消按钮
    cancel() {
      this.open = false
      this.reset()
    },
    // 表单重置
    reset() {
      this.form = {
        orderNo: null,
        customerName: null,
        leaseTerm: null,
        actualLeaseTerm: null,
        orderStatus: null,
        pickUpAddress: null,
        returnAddress: null,
        licensePlate: null,
        ctripOrderNo: null,
        paymentMethod: null,
        orderAmount: null,
        ctripPaidInAmount: null,
        discountAmount: null,
        authorization: null,
        authorizationRequired: null,
        illegalAuthorization: null,
        illegaRequired: null,
        earlyReturnAmount: null,
        extraHourlyFee: null,
        serviceFee: null,
        pickUpServiceFee: null,
        drivingFee: null,
        extraKilometerFee: null,
        fuelCost: null,
        cleaningFee: null,
        lossOfWorking: null,
        maintenanceCost: null,
        refuelingServiceFee: null,
        nightServiceCharge: null,
        otherExpenses: null,
        basicServiceFee: null,
        carRentalFee: null,
        serviceCharge: null,
        differentStore: null,
        finalAmount: null,
        returnKilometers: null,
        pickUpKilometers: null,
        returnFuelVolume: null,
        vehicleOilVolume: null,
        actualReturnTime: null,
        returnServiceType: null,
        returnTime: null,
        actualPickUpTime: null,
        typeService: null,
        pickUpTime: null,
        model: null,
        storeName: null,
        cityName: null,
        supplier: null,
        orderTime: null,
        orderChannel: null,
        renewalFee: null,
        preferredOrNot: null,
        orderType: null,
        childSeat: null,
        gpsServiceFee: null,
        preferentialServiceFee: null,
        worryFreeServiceFee: null,
        liquidatedDamages: null,
        thirdPartyPaid: null,
        receivableActual: null,
        orderPaidInAmount: null,
        supplementary: null,
        refundAmount: null,
        receivableAmount: null,
        vehicleDamage: null,
        illegalDeduction: null,
        deliveryDriver: null,
        receivingDriver: null,
        source: null,
        sourceSupplier: null,
        typeOfIdCard: null,
        leaseType: null,
      }
      this.resetForm('form')
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1
      this.getList()
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.queryParams = {
        orderNo: null,
        orderStatus: null,
        pageNum: 1,
        pageSize: 10,
        customerName: null,
      }
      this.resetForm('queryForm')
      this.handleQuery()
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset()
      const orderNo = row.orderNo || this.ids
      getXcOrder(orderNo).then((response) => {
        this.form = response.data
        this.open = true
      })
    },

    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = '携程订单导入'
      this.upload.open = true
    },
    // 文件上传中处理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true
    },
    // 文件上传成功处理
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false
      this.upload.isUploading = false
      this.$refs.upload.clearFiles()
      this.$alert(response.msg, '导入结果', {
        dangerouslyUseHTMLString: true,
      })
      this.getList()
    },
    // 提交上传文件
    submitFileForm() {
      this.$refs.upload.submit()
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams
      this.$modal
        .confirm('是否确认导出所有携程订单数据项？')
        .then(() => {
          this.exportLoading = true
          return exportXcOrder(queryParams)
        })
        .then((response) => {
          this.$download.name(response.msg)
          this.exportLoading = false
        })
        .catch(() => {})
    },
  },
}
</script>
<style>
.margin-bottom {
  margin-bottom: 20px;
}
</style>
